package com.texaco.chapasFutbol.multiplayer.mensajes;

import java.util.Map;

import org.json.JSONException;

public class ResumeMatchMessage extends BaseMessage{
	
	private static final long serialVersionUID = -8482898393471308135L;
	private long idClient;
	private long idMatch;
	
	public ResumeMatchMessage() throws JSONException{
		super(MESSAGE_RESUME_MATCH);
	}
	
	public ResumeMatchMessage(String jsonStr) throws JSONException{
		super(MESSAGE_RESUME_MATCH, jsonStr);
	}
	
	public ResumeMatchMessage(Map<String, String> jsonMap) throws JSONException{
		super(MESSAGE_RESUME_MATCH, jsonMap);
	}
	
	@Override
	protected void preRead() {
		
		try {
			idClient = getLong(FIELD_ID_CLIENT);
			idMatch = getLong(FIELD_ID_MATCH);
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}

	@Override
	protected void preWrite() {
		try {
			put(FIELD_ID_CLIENT, idClient);
			put(FIELD_ID_MATCH, idMatch);
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}

	public long getIdClient() {
		return idClient;
	}

	public void setIdClient(long idClient) {
		this.idClient = idClient;
	}

	public long getIdMatch() {
		return idMatch;
	}

	public void setIdMatch(long idMatch) {
		this.idMatch = idMatch;
	}
}
